import { apiGetEchartsData } from "@/api/echarts";

const state = {eData: {}}

const actions = {
  // 获取echarts数据
  async getEchartsData({commit}) {
    let res = await apiGetEchartsData()
    if(res.code === 200) {
      commit('GETECHARTSDATA', res.data)
    }
  }
}
const mutations = {
  GETECHARTSDATA(state,val){
    state.eData = val
  }
}
export default {
  namespaced: true,
  state,
  mutations,
  actions
}
